import axios from 'axios'
// 设置请求路径
const request = axios.create({
    baseURL:`${process.env.VUE_APP_URL}/api`,//域名
    // access_token:localStorage.getItem('token'),
})
// 使用路由拦截设置请求头
request.interceptors.request.use((req) => {
        let authorization = localStorage.getItem('authorization');
        if(authorization){
            req.headers.authorization = authorization;
        }
        return req
    })
export default request;